<script language="javascript" type="text/javascript">
$(document).ready(function(){
	$("input[name=dmm_machine_name]").focus();
	<?cs if:config.action == "save_mod_machine" ?>
	$("#dmm_machine_model").children("option").each(function(){
		if(<?cs var:machine.dmm_machine_model ?> == $(this).val())
			$(this).attr("selected", true);
	});

	$("#dmm_machine_warn_flag").children("option").each(function(){
		if(<?cs var:machine.dmm_machine_warn_flag ?> == $(this).val())
			$(this).attr("selected", true);
	});

	$("#dmm_machine_ip").attr("readonly", true);
	$("input[name=dmm_machine_name]").val("<?cs var:machine.dmm_machine_name ?>");
	$("textarea[name=dmm_machine_desc]").val("<?cs var:machine.dmm_machine_desc ?>");
	<?cs /if ?>
});
</script>
<style>
#dmm_pageFormContent p label { width:80px; }
</style>

<div class="pageContent">
	<form method="get" action="<?cs var:config.cgipath?>mt_slog_machine?action=<?cs var:config.action ?>&navTabId=dmt_machine" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH='40' id='dmm_pageFormContent'>
			<input type="hidden" name="dmm_machine_id" value="<?cs var:machine.dmm_machine_id?>" />
			<p>
				<label>机器名称：</label>
				<input type="text" size="28" name="dmm_machine_name" maxlength="16" alt="请输入机器名称" class="required" />
			</p>
			<p>
				<label>机器IP：</label>
				<input type="text" size="20" id="dmm_machine_ip" name="dmm_machine_ip" maxlength="16" alt="请输入机器IP" class="required" value="<?cs var:machine.dmm_machine_ip ?>" />
			</p>
			<p>
				<label>机器IP2：</label>
				<input type="text" size="20" name="dmm_machine_ip2" maxlength="16" alt="请输入机器IP2" value="<?cs var:machine.dmm_machine_ip2 ?>" />
			</p>
			<p>
				<label>机器IP3：</label>
				<input type="text" size="20" name="dmm_machine_ip3" maxlength="16" alt="请输入机器IP3" value="<?cs var:machine.dmm_machine_ip3 ?>" />
			</p>
			<p>
				<label>机器IP4：</label>
				<input type="text" size="20" name="dmm_machine_ip4" maxlength="16" alt="请输入机器IP4" value="<?cs var:machine.dmm_machine_ip4 ?>" />
			</p>
			<p>
				<label>告警标记：</label>
				<select class="combox" name="dmm_machine_warn_flag" id="dmm_machine_warn_flag">
					<option value="<?cs var:config.dmm_mach_allow_all ?>">不屏蔽</option>
					<option value="<?cs var:config.dmm_mach_deny_all ?>">完全屏蔽</option>
					<option value="<?cs var:config.dmm_mach_deny_basic ?>">屏蔽基础告警</option>
					<option value="<?cs var:config.dmm_mach_deny_except ?>">屏蔽异常告警</option>
				</select>
			</p>
			<p>
				<label>机器描述：</label>
				<textarea rows="4" cols="20" name="dmm_machine_desc" maxlength="64" class="required"></textarea>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><button type="submit" class="buttonActive">保存</button></li>
				<li><button type="button" class="buttonActive close">关闭</button></li>
			</ul>
		</div>
	</form>
</div>

